package org.jeecg.modules.yc.NB.Controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author 吴荣华
 * @Description NBApplicationController
 * @Date 2022年03月16日 11:37
 * @Version 1.0
 */
@RestController
@RequestMapping(value = "/dm/lwm2m")
@Api(value = "lwm2m协议")
public class NBApplicationController {


    @ApiOperation(value = "设备上下线通知")
    @RequestMapping(value = "/upAndDown", method = RequestMethod.POST)
    public void upAndDown(String request, HttpServletResponse response)
            throws Exception {
        System.out.println("设备上下线:  "+request);

    }


    @ApiOperation(value = "**************************设备指令响应通知************************")
    @RequestMapping(value = "/instructions", method = RequestMethod.POST)
    public void Instructions(HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        System.out.println("设备指令响应通知");

    }



    @ApiOperation(value = "设备数据变化通知")
    @RequestMapping(value = "/DataChange", method = RequestMethod.POST)
    public void DataChange(HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        System.out.println("设备数据变化通知");

    }

    @ApiOperation(value = "NB设备状态变化")
    @RequestMapping(value = "/post", method = RequestMethod.POST)
    public void post(String request, HttpServletResponse response)
            throws Exception {
        System.out.println("HTTP消息推送。。。。"+request);

    }


    @ApiOperation(value = "NB设备指令结果")
    @RequestMapping(value = "/operationResult", method = RequestMethod.POST)
    public void operationResult(HttpServletRequest request, HttpServletResponse response) throws Exception {

    }

}
